package org.wisdom.data.jpa.entity;

import lombok.*;
import org.wisdom.data.jpa.annotation.SerialNumber;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 测试类
 *
 * @author zhangzhiyan
 * @date 2022/05/13 11:37
 **/
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Table
public class Demo extends BaseEntity {

    @SerialNumber
    String code;

    @SerialNumber(key = "{bizType}{d}", value = "{bizType}{d}{n}")
    String code1;

    @SerialNumber(value = "BM{d}{n}")
    String code2;

    @SerialNumber(value = "BM{d}{n}")
    String code3;

    @SerialNumber(value = "BM{d}A{n}", dateFormat = "yyyyMM", numberLength = 6)
    String code4;

    String name;

    String bizType;
}
